﻿using UnityEngine;

namespace Core
{
    public class UnTouchSystem : Component, IAwake
    {
        private GameObject goTouch;
        private GameObject goUIRoot;
        private Camera camera;
        public void Awake()
        {
            goTouch = Utils.Trans.Find(S.gameObject, "Touch");

            var go_cam = Utils.Trans.Find(goTouch, "Camera");
            camera = go_cam.GetComponent<Camera>();
            if (camera != null)
            {
                camera.enabled = false;
            }
            goUIRoot = Utils.Trans.Find(goTouch, "UIRoot");

            goUIRoot.SetActive(false);
        }

        public override void Dispose()
        {
            if (IsDisposed) return;
            base.Dispose();
        }
    }
}
